home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / library / gtlsr374.lha / GadUtil / Install_User next >
Text File  |  1996-05-14  |  4KB  |  148 lines

  1. ;--------------------------- Current version.revision ----------------------
  2. (set vernum (getversion "libs:gadutil.library"))
  3.  
  4. (set thisvernum (getversion "libs/gadutil.library"))
  5. (set thisver (/ thisvernum 65536))
  6. (set thisrev (- thisvernum (* thisver 65536)))
  7.  
  8. ;---------------------- All strings in the script --------------------------
  9.  
  10. (set #install-msg        "Installing GadUtil.library...")
  11.  
  12. (set #info-msg     (cat    "\n\nGadUtil installation script.\n"
  13.                         ("This script installs GadUtil %ld.%ld on your system.\n\n" thisver thisrev)
  14.                         "Read the docs for more information on the "
  15.                         "distribution and for use in commercial or "
  16.                         "other non-free programs.\n\n"
  17.                         "GadUtil is Copyright © 1994-1996 by\n"
  18.                         "P-O Yliniemi and Staffan Hämälä.\n"
  19.                         "All rights reserved."))
  20.  
  21. (set #useroptions-msg    "Select which user file(s) to install")
  22. (set #useroption1-msg    "The library file (replaces old version)")
  23. (set #useroption2-msg    "The debug version of the library file")
  24. (set #useroption3-msg    "User documentation")
  25. (set #useroption4-msg    "Aminet .readme file")
  26.  
  27. (set #maindir-msg  (cat    "Where do you wish to install GadUtil related\n"
  28.                         "files? The Installer will NOT create a new\n"
  29.                         "drawer at the selected location."))
  30.  
  31. (set #sellocfor-msg        "Please select a location for")
  32. (set #docdir-msg        ("%s all documentation" #sellocfor-msg))
  33.  
  34. (set #debuglib-msg (cat "\nYou have selected to install another version\n"
  35.                         "of GadUtil.library, that contains some extra\n"
  36.                         "code for debugging. This version can be used\n"
  37.                         "to trace problems while starting up applications\n"
  38.                         "that uses gadutil.library.\n\n"
  39.                         "To use the 'debug' version, rename the original\n"
  40.                         "library to something else, and rename the 'debug'\n"
  41.                         "version to 'gadutil.library'. Type 'avail flush'\n"
  42.                         "in Shell to remove the normal library from memory.\n"
  43.                         "You may have to reboot to remove the library from\n"
  44.                         "memory. Start the program and read...\n"))
  45.  
  46. (set #libinst-msg        "Installing gadutil.library.")
  47. (set #debuglibinst-msg    "Installing gadutil.library (debug version).")
  48.  
  49. ;-------------------- Installation script begins here ----------------------
  50. (set olduserlevel @user-level)
  51. (user 2)
  52. (transcript #install-msg)
  53. (message #info-msg)
  54. (user olduserlevel)
  55.  
  56. ;-------------------------- Get options for user install -------------------
  57. (set userinstall
  58.     (askoptions
  59.         (prompt #useroptions-msg)
  60.         (help    @askoptions-help)
  61.         (choices    #useroption1-msg
  62.                     #useroption2-msg
  63.                     #useroption3-msg
  64.                     #useroption4-msg
  65.         )
  66.         (default %1101)
  67.     )
  68. )
  69.  
  70. ;-------------------------- Create main directory --------------------------
  71. (if (IN userinstall 2 3)
  72.     (
  73.         (set destdir
  74.             (askdir
  75.                 (prompt #maindir-msg)
  76.                 (help @askdir-help)
  77.                 (default @default-dest)
  78.             )
  79.         )
  80.         (if (= @user-level 0) (set destdir (tackon destdir "GadUtil")))
  81.  
  82.         (if (<> (substr destdir (- (strlen destdir) 1)) ":")
  83.             (makedir destdir (infos))
  84.         )
  85.  
  86.         (set @default-dest destdir)
  87.  
  88.         (set docdir
  89.             (askdir
  90.                 (prompt #docdir-msg)
  91.                 (help @askdir-help)
  92.                 (newpath)
  93.                 (default (tackon destdir "Docs"))
  94.             )
  95.         )
  96.         (makedir docdir (infos))
  97.     )
  98. )
  99.  
  100. ;-------------------------- Do user installation ---------------------------
  101. (if (IN userinstall 0)
  102.        (copylib
  103.         (prompt #libinst-msg)
  104.            (help @copylib-help)
  105.            (source "libs/gadutil.library")
  106.            (dest "libs:")
  107.            (confirm)
  108.     )
  109. )
  110.  
  111. (if (IN userinstall 1)
  112.     (
  113.         (message #debuglib-msg)
  114.         (copylib
  115.             (prompt #debuglibinst-msg)
  116.             (help @copylib-help)
  117.             (source "libs/gadutil.library_dbg")
  118.             (dest "libs:")
  119.             (confirm)
  120.         )
  121.     )
  122. )
  123.  
  124. (if (IN userinstall 2)
  125.     (
  126.         (copyfiles (source "docs/GadUtil.manual")
  127.             (dest docdir)
  128.         )
  129.         (copyfiles (source "icons/def_doc.info")
  130.             (dest docdir) (newname "GadUtil.manual.info")
  131.         )
  132.     )
  133. )
  134.  
  135. (if (IN userinstall 3)
  136.     (
  137.         (copyfiles (source "docs/GUtilInfo.txt")
  138.             (dest docdir)
  139.         )
  140.         (copyfiles (source "icons/def_doc.info")
  141.             (dest docdir) (newname "GUtilInfo.txt.info")
  142.         )
  143.     )
  144. )
  145.     
  146. ;--------------------------------- Done ------------------------------------
  147. (exit)
  148.